home *** CD-ROM | disk | FTP | other *** search
- MODULO(3I) Last changed: 4-13-99
-
-
- NNAAMMEE
- MMOODDUULLOO - Modulo function
-
- SSYYNNOOPPSSIISS
- MMOODDUULLOO (([AA==]_a,, [PP==]_p))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, IRIX systems
-
- CF90, MIPSpro 7 Fortran 90
-
- SSTTAANNDDAARRDDSS
- Fortran
-
- DDEESSCCRRIIPPTTIIOONN
- The MMOODDUULLOO function returns the remainder of _a divided by _p using
- modulo math. The result always has the sign of the modulo base, _p.
-
- This function accepts the following arguments:
-
- _a Must be of type integer or real
-
- _p Must be of the same type and kind type parameter as _a
-
- MMOODDUULLOO is an elemental function. The name of this intrinsic cannot be
- passed as an argument.
-
- RREETTUURRNN VVAALLUUEESS
- The result type and type parameter are the same as _a.
-
- When _a is of type integer, if _p is not equal to zero, MMOODDUULLOO (_a, _p)
- has the value _r such that _a == _q x _p ++ _r, where _q is an integer. The
- inequality 0 <= _r < _p holds if _p > 0, and _p < _r <= 0 holds if _p < 0.
- If _p = 0, the result is 0.
-
- When _a is of type real, if _p is not equal to zero, the value of the
- result is _a - FFLLOOOORR (_a / _p) * _p. The result can be a NaN when that
- value is available.
-
- EEXXAAMMPPLLEESS
- Example 1. MMOODDUULLOO((88,,55)) has the value 3.
-
- Example 2. MMOODDUULLOO((--88,,55)) has the value 2.
-
- Example 3. MMOODDUULLOO((88,,--55)) has the value -2.
-
- Example 4. MMOODDUULLOO((--88,,--55)) has the value -3.
-
- SSEEEE AALLSSOO
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
- man page.
-